package com.example.currentlimiting.demo.exception;

import org.springframework.http.HttpStatus;

/**
 * Created by liunanhua on 2018/5/9.
 */
public class AppBusinessException extends BaseException {

    private String code = HttpStatus.OK.getReasonPhrase();

    //类似Http状态码
    private int httpStatus = HttpStatus.OK.value();

    public AppBusinessException(String code, int httpStatus, String message) {
        super(message);
        this.code = code;
        this.httpStatus = httpStatus;
    }

    public AppBusinessException(String message) {
        super(message);
    }

    public String getCode() {
        return code;
    }

    public int getHttpStatus() {
        return httpStatus;
    }
}